package com.yf.exam.modules.exam.ext.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
* <p>
* 监考总览统计类
* </p>
*
* @author 聪明笨狗
* @since 2020-07-25 16:18
*/
@Data
@ApiModel(value="监考总览统计类", description="监考总览统计类")
public class WatchStatRespDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "考试名称", required=true)
    private String title;
    @ApiModelProperty(value = "应考人数", required=true)
    private Integer requireCount;
    @ApiModelProperty(value = "在考人数", required=true)
    private Integer processCount;
    @ApiModelProperty(value = "交卷人数", required=true)
    private Integer handCount;
    @ApiModelProperty(value = "答题人数", required=true)
    private Integer joinCount;
    @ApiModelProperty(value = "缺考人数", required=true)
    private Integer missCount;

    @ApiModelProperty(value = "申请人数", required=true)
    private Integer applyCount;


    /**
     * 获取缺考人数
     * @return
     */
    public Integer getMissCount(){
        if(joinCount == null || joinCount ==0){
            return requireCount;
        }

        return requireCount - joinCount;
    }

}
